package tech.aistar.day06;

import java.util.Arrays;

/**
 * 本类用来演示: 测试类
 *
 * @author: success
 * @date: 2021/3/15 8:48 上午
 */
public class TestEmpBiz {
    public static void main(String[] args) {
        Emp boss = new Emp(1,"tom",1000.0d,new Emp[0]);

        Emp e1 = new Emp(2,"admin",50.0d,null);
        Emp e2 = new Emp(3,"jack",60.0d,null);

        //创建一个业务类对象
        EmpBiz biz = new EmpBiz();
        biz.addEmp(boss,e1);

        //System.out.println(Arrays.toString(boss.getEmps()));

        //查找价格
        Emp[] all = new Emp[3];
        all[0] = boss;
        all[1] = e1;
        all[2] = e2;

        //创建条件查询的对象
        EmpVo vo = new EmpVo();
        vo.setSalary(60.d);
        //
        Emp[] temp = biz.findByPrice(all,vo);
        for (Emp emp : temp) {
            System.out.println(emp);
        }

    }
}
